<template>
  <section>
      <div class="order-success">
        <img class="order-success_img" src="../../assets/img/success-icon.png" alt="">
        <div class="order-success_txt">下单成功</div>
      </div>

    <div class="order-success">
      <van-button @click="goUrl('/user');" style="width: 80%;" plain hairline type="primary">查看订单</van-button>
      <van-button @click="goHome();" style="width: 80%;margin-top: 0.2rem;" plain hairline type="primary">返回首页</van-button>
    </div>



  </section>
</template>
<script>
  export default {
    name:'orderSuccess',
    data() {
      return {
      }
    },
    methods: {
      goHome() {
        var url = window.location.origin + window.location.pathname+'?vt='+new Date().getTime() + '#/index?auth=1';
        window.location.href = url;
      },
      goUrl(url) {
        this.$nocacheRouter(url);
      },
    },

    mounted(){
    }
  };
</script>
<style scoped>
  .order-success {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
  }

  .order-success_img {
    width: 2rem;
  }

  .order-success_txt {
    font-size: 20px;
    font-weight: 500;
    margin-top: 5px;
  }

</style>
